home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / list / addhead.c next >
C/C++ Source or Header  |  2001-05-12  |  342b  |  22 lines

  1.  
  2. #include "tek/list.h"
  3.  
  4. /* 
  5. **    TEKlib
  6. **    (C) 2001 TEK neoscientists
  7. **    all rights reserved.
  8. **
  9. **    void TAddHead(TLIST *list, TNODE *node)
  10. **
  11. **    add node at head of list
  12. */
  13.  
  14. TVOID TAddHead(TLIST *list, TNODE *node)
  15. {
  16.     TNODE *temp = list->head;
  17.     list->head = node;
  18.     node->succ = temp;
  19.     node->pred = (TNODE *) &list->head;
  20.     temp->pred = node;
  21. }
  22.